import Vue from 'vue'
import Router from 'vue-router'
import Shop from './views/shop'

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  linkActiveClass:'active',
  routes: [
    {
      path: '/',
      redirect:'/shop'
    },
    {
      path: '/shop',
      name: 'shop',
      component: Shop,
      children:[
        {
          path:'goods',
          component: () => import('@/views/goods'),
          meta:{
            keepAlive: true
          }
        },
        {
          path:'ratings',
          component: () => import('@/components/vB'),
          meta:{
            keepAlive: true
          }
        },
        {
          path:'seller',
          component: () => import('@/components/vC'),
          meta:{
            keepAlive: true
          }
        }
      ]
    },
  ]
})
